package com.video.demo.controller;





import com.alibaba.fastjson.JSONObject;

import com.video.demo.entity.ToCamera;
import com.video.demo.service.CameraService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.List;

@RestController
@Slf4j
public class ToCameraController {
    @Autowired
  private CameraService cs;
    @PostMapping("/getcamera")
    @ResponseBody
    public String GostCamera(String appKey, String appSecret){
        String toCamera = cs.GostCamera(appKey,appSecret);

        //将对象转化为json字符串
//    String s = JSONObject.toJSONString(toCamera);
        //          Object obj = JSON.parse(toCamera);
          return toCamera;

    }

//    @PostMapping("/postvido")
//    @ResponseBody
//    public String PostVido( String pageStart,String pageSize){
//      String vido = cs.PostVido(pageStart,pageSize);
//
//
//        return vido;
//
//    }




}
